home *** CD-ROM | disk | FTP | other *** search
ASP.NET Web Form | 2002-03-17 | 2.9 KB | 49 lines |
- <%@ Page Language="vb" AutoEventWireup="false" Codebehind="PagingForm.aspx.vb" Inherits="DataBinding.PagingForm" %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <title>PagingForm</title>
- <meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
- <meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
- <meta content="JavaScript" name="vs_defaultClientScript">
- <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
- </HEAD>
- <body>
- <form id="Form1" method="post" runat="server">
- <H1>DataGrid Paging Demo</H1>
- <P>This form demonstrates the three techniques for doing pagination with a DataGrid
- control. You must change a constant in the source code to see how each mode
- works.</P>
- <P>
- <asp:DataGrid id="dgrTitles" runat="server" Width="751px" Height="185px" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" BackColor="White" CellPadding="3" GridLines="Vertical" AllowPaging="True" AutoGenerateColumns="False" AllowSorting="True" PageSize="8" AllowCustomPaging="True">
- <SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#008A8C"></SelectedItemStyle>
- <AlternatingItemStyle BackColor="Gainsboro"></AlternatingItemStyle>
- <ItemStyle ForeColor="Black" BackColor="#EEEEEE"></ItemStyle>
- <HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#000084"></HeaderStyle>
- <FooterStyle ForeColor="Black" BackColor="#CCCCCC"></FooterStyle>
- <Columns>
- <asp:BoundColumn DataField="Title" SortExpression="Title" HeaderText="Title"></asp:BoundColumn>
- <asp:BoundColumn DataField="ISBN" SortExpression="ISBN" HeaderText="ISBN"></asp:BoundColumn>
- <asp:BoundColumn DataField="PubName" SortExpression="PubName" HeaderText="Publisher"></asp:BoundColumn>
- <asp:BoundColumn DataField="Year Published" SortExpression="Year Published" HeaderText="Year"></asp:BoundColumn>
- </Columns>
- <PagerStyle Visible="False" HorizontalAlign="Center" ForeColor="Black" BackColor="#999999"></PagerStyle>
- </asp:DataGrid></P>
- <P>
- <asp:Panel id="Panel1" runat="server" Width="751px" Height="24px" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" BackColor="Navy" HorizontalAlign="Center">
- <P>
- <asp:Button id="btnFirst" runat="server" Text="First" CommandName="First"></asp:Button>
- <asp:Button id="btnPrevious" runat="server" Text="Prev" CommandName="Prev"></asp:Button>
-
- <asp:TextBox id="txtPage" runat="server" Width="43px"></asp:TextBox>
- <asp:Button id="btnGo" runat="server" Text="Go" CommandName="Go"></asp:Button>
-
- <asp:Button id="btnNext" runat="server" Text="Next" CommandName="Next"></asp:Button>
-
- <asp:Button id="btnLast" runat="server" Text="Last" CommandName="Last"></asp:Button></P>
- </asp:Panel>
- <P></P>
- </form>
- </body>
- </HTML>
-